/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("protobufjs/minimal.js");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.AICalcUnitAuth = (function() {

    /**
     * Namespace AICalcUnitAuth.
     * @exports AICalcUnitAuth
     * @namespace
     */
    var AICalcUnitAuth = {};

    /**
     * AuthMsgType enum.
     * @name AICalcUnitAuth.AuthMsgType
     * @enum {number}
     * @property {number} S_Auth=0 S_Auth value
     */
    AICalcUnitAuth.AuthMsgType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "S_Auth"] = 0;
        return values;
    })();

    AICalcUnitAuth.Auth = (function() {

        /**
         * Properties of an Auth.
         * @memberof AICalcUnitAuth
         * @interface IAuth
         * @property {Uint8Array|null} [passwdWithIdentMD5] Auth passwdWithIdentMD5
         */

        /**
         * Constructs a new Auth.
         * @memberof AICalcUnitAuth
         * @classdesc Represents an Auth.
         * @implements IAuth
         * @constructor
         * @param {AICalcUnitAuth.IAuth=} [properties] Properties to set
         */
        function Auth(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Auth passwdWithIdentMD5.
         * @member {Uint8Array} passwdWithIdentMD5
         * @memberof AICalcUnitAuth.Auth
         * @instance
         */
        Auth.prototype.passwdWithIdentMD5 = $util.newBuffer([]);

        /**
         * Creates a new Auth instance using the specified properties.
         * @function create
         * @memberof AICalcUnitAuth.Auth
         * @static
         * @param {AICalcUnitAuth.IAuth=} [properties] Properties to set
         * @returns {AICalcUnitAuth.Auth} Auth instance
         */
        Auth.create = function create(properties) {
            return new Auth(properties);
        };

        /**
         * Encodes the specified Auth message. Does not implicitly {@link AICalcUnitAuth.Auth.verify|verify} messages.
         * @function encode
         * @memberof AICalcUnitAuth.Auth
         * @static
         * @param {AICalcUnitAuth.IAuth} message Auth message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Auth.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.passwdWithIdentMD5 != null && Object.hasOwnProperty.call(message, "passwdWithIdentMD5"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.passwdWithIdentMD5);
            return writer;
        };

        /**
         * Encodes the specified Auth message, length delimited. Does not implicitly {@link AICalcUnitAuth.Auth.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICalcUnitAuth.Auth
         * @static
         * @param {AICalcUnitAuth.IAuth} message Auth message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Auth.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an Auth message from the specified reader or buffer.
         * @function decode
         * @memberof AICalcUnitAuth.Auth
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICalcUnitAuth.Auth} Auth
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Auth.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AICalcUnitAuth.Auth();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.passwdWithIdentMD5 = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an Auth message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICalcUnitAuth.Auth
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICalcUnitAuth.Auth} Auth
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Auth.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an Auth message.
         * @function verify
         * @memberof AICalcUnitAuth.Auth
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Auth.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.passwdWithIdentMD5 != null && message.hasOwnProperty("passwdWithIdentMD5"))
                if (!(message.passwdWithIdentMD5 && typeof message.passwdWithIdentMD5.length === "number" || $util.isString(message.passwdWithIdentMD5)))
                    return "passwdWithIdentMD5: buffer expected";
            return null;
        };

        /**
         * Creates an Auth message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICalcUnitAuth.Auth
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICalcUnitAuth.Auth} Auth
         */
        Auth.fromObject = function fromObject(object) {
            if (object instanceof $root.AICalcUnitAuth.Auth)
                return object;
            var message = new $root.AICalcUnitAuth.Auth();
            if (object.passwdWithIdentMD5 != null)
                if (typeof object.passwdWithIdentMD5 === "string")
                    $util.base64.decode(object.passwdWithIdentMD5, message.passwdWithIdentMD5 = $util.newBuffer($util.base64.length(object.passwdWithIdentMD5)), 0);
                else if (object.passwdWithIdentMD5.length >= 0)
                    message.passwdWithIdentMD5 = object.passwdWithIdentMD5;
            return message;
        };

        /**
         * Creates a plain object from an Auth message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICalcUnitAuth.Auth
         * @static
         * @param {AICalcUnitAuth.Auth} message Auth
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Auth.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                if (options.bytes === String)
                    object.passwdWithIdentMD5 = "";
                else {
                    object.passwdWithIdentMD5 = [];
                    if (options.bytes !== Array)
                        object.passwdWithIdentMD5 = $util.newBuffer(object.passwdWithIdentMD5);
                }
            if (message.passwdWithIdentMD5 != null && message.hasOwnProperty("passwdWithIdentMD5"))
                object.passwdWithIdentMD5 = options.bytes === String ? $util.base64.encode(message.passwdWithIdentMD5, 0, message.passwdWithIdentMD5.length) : options.bytes === Array ? Array.prototype.slice.call(message.passwdWithIdentMD5) : message.passwdWithIdentMD5;
            return object;
        };

        /**
         * Converts this Auth to JSON.
         * @function toJSON
         * @memberof AICalcUnitAuth.Auth
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Auth.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Auth
         * @function getTypeUrl
         * @memberof AICalcUnitAuth.Auth
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Auth.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICalcUnitAuth.Auth";
        };

        return Auth;
    })();

    AICalcUnitAuth.AuthRes = (function() {

        /**
         * Properties of an AuthRes.
         * @memberof AICalcUnitAuth
         * @interface IAuthRes
         * @property {Common.IResBase|null} [res] AuthRes res
         * @property {boolean|null} [authSuccess] AuthRes authSuccess
         */

        /**
         * Constructs a new AuthRes.
         * @memberof AICalcUnitAuth
         * @classdesc Represents an AuthRes.
         * @implements IAuthRes
         * @constructor
         * @param {AICalcUnitAuth.IAuthRes=} [properties] Properties to set
         */
        function AuthRes(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * AuthRes res.
         * @member {Common.IResBase|null|undefined} res
         * @memberof AICalcUnitAuth.AuthRes
         * @instance
         */
        AuthRes.prototype.res = null;

        /**
         * AuthRes authSuccess.
         * @member {boolean} authSuccess
         * @memberof AICalcUnitAuth.AuthRes
         * @instance
         */
        AuthRes.prototype.authSuccess = false;

        /**
         * Creates a new AuthRes instance using the specified properties.
         * @function create
         * @memberof AICalcUnitAuth.AuthRes
         * @static
         * @param {AICalcUnitAuth.IAuthRes=} [properties] Properties to set
         * @returns {AICalcUnitAuth.AuthRes} AuthRes instance
         */
        AuthRes.create = function create(properties) {
            return new AuthRes(properties);
        };

        /**
         * Encodes the specified AuthRes message. Does not implicitly {@link AICalcUnitAuth.AuthRes.verify|verify} messages.
         * @function encode
         * @memberof AICalcUnitAuth.AuthRes
         * @static
         * @param {AICalcUnitAuth.IAuthRes} message AuthRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AuthRes.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.res != null && Object.hasOwnProperty.call(message, "res"))
                $root.Common.ResBase.encode(message.res, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.authSuccess != null && Object.hasOwnProperty.call(message, "authSuccess"))
                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.authSuccess);
            return writer;
        };

        /**
         * Encodes the specified AuthRes message, length delimited. Does not implicitly {@link AICalcUnitAuth.AuthRes.verify|verify} messages.
         * @function encodeDelimited
         * @memberof AICalcUnitAuth.AuthRes
         * @static
         * @param {AICalcUnitAuth.IAuthRes} message AuthRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        AuthRes.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes an AuthRes message from the specified reader or buffer.
         * @function decode
         * @memberof AICalcUnitAuth.AuthRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {AICalcUnitAuth.AuthRes} AuthRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AuthRes.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AICalcUnitAuth.AuthRes();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.res = $root.Common.ResBase.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.authSuccess = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes an AuthRes message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof AICalcUnitAuth.AuthRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {AICalcUnitAuth.AuthRes} AuthRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        AuthRes.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies an AuthRes message.
         * @function verify
         * @memberof AICalcUnitAuth.AuthRes
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        AuthRes.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.res != null && message.hasOwnProperty("res")) {
                var error = $root.Common.ResBase.verify(message.res);
                if (error)
                    return "res." + error;
            }
            if (message.authSuccess != null && message.hasOwnProperty("authSuccess"))
                if (typeof message.authSuccess !== "boolean")
                    return "authSuccess: boolean expected";
            return null;
        };

        /**
         * Creates an AuthRes message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof AICalcUnitAuth.AuthRes
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {AICalcUnitAuth.AuthRes} AuthRes
         */
        AuthRes.fromObject = function fromObject(object) {
            if (object instanceof $root.AICalcUnitAuth.AuthRes)
                return object;
            var message = new $root.AICalcUnitAuth.AuthRes();
            if (object.res != null) {
                if (typeof object.res !== "object")
                    throw TypeError(".AICalcUnitAuth.AuthRes.res: object expected");
                message.res = $root.Common.ResBase.fromObject(object.res);
            }
            if (object.authSuccess != null)
                message.authSuccess = Boolean(object.authSuccess);
            return message;
        };

        /**
         * Creates a plain object from an AuthRes message. Also converts values to other types if specified.
         * @function toObject
         * @memberof AICalcUnitAuth.AuthRes
         * @static
         * @param {AICalcUnitAuth.AuthRes} message AuthRes
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        AuthRes.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.res = null;
                object.authSuccess = false;
            }
            if (message.res != null && message.hasOwnProperty("res"))
                object.res = $root.Common.ResBase.toObject(message.res, options);
            if (message.authSuccess != null && message.hasOwnProperty("authSuccess"))
                object.authSuccess = message.authSuccess;
            return object;
        };

        /**
         * Converts this AuthRes to JSON.
         * @function toJSON
         * @memberof AICalcUnitAuth.AuthRes
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        AuthRes.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for AuthRes
         * @function getTypeUrl
         * @memberof AICalcUnitAuth.AuthRes
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        AuthRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/AICalcUnitAuth.AuthRes";
        };

        return AuthRes;
    })();

    return AICalcUnitAuth;
})();

$root.Common = (function() {

    /**
     * Namespace Common.
     * @exports Common
     * @namespace
     */
    var Common = {};

    /**
     * MsgType enum.
     * @name Common.MsgType
     * @enum {number}
     * @property {number} M_Heartbeat=0 M_Heartbeat value
     * @property {number} M_AICalcUnitAuth=1 M_AICalcUnitAuth value
     * @property {number} M_UserInfo=2 M_UserInfo value
     * @property {number} M_Calc=3 M_Calc value
     * @property {number} M_CalcConfig=4 M_CalcConfig value
     */
    Common.MsgType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "M_Heartbeat"] = 0;
        values[valuesById[1] = "M_AICalcUnitAuth"] = 1;
        values[valuesById[2] = "M_UserInfo"] = 2;
        values[valuesById[3] = "M_Calc"] = 3;
        values[valuesById[4] = "M_CalcConfig"] = 4;
        return values;
    })();

    Common.ResBase = (function() {

        /**
         * Properties of a ResBase.
         * @memberof Common
         * @interface IResBase
         * @property {number|null} [errcode] ResBase errcode
         */

        /**
         * Constructs a new ResBase.
         * @memberof Common
         * @classdesc Represents a ResBase.
         * @implements IResBase
         * @constructor
         * @param {Common.IResBase=} [properties] Properties to set
         */
        function ResBase(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * ResBase errcode.
         * @member {number} errcode
         * @memberof Common.ResBase
         * @instance
         */
        ResBase.prototype.errcode = 0;

        /**
         * Creates a new ResBase instance using the specified properties.
         * @function create
         * @memberof Common.ResBase
         * @static
         * @param {Common.IResBase=} [properties] Properties to set
         * @returns {Common.ResBase} ResBase instance
         */
        ResBase.create = function create(properties) {
            return new ResBase(properties);
        };

        /**
         * Encodes the specified ResBase message. Does not implicitly {@link Common.ResBase.verify|verify} messages.
         * @function encode
         * @memberof Common.ResBase
         * @static
         * @param {Common.IResBase} message ResBase message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ResBase.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.errcode != null && Object.hasOwnProperty.call(message, "errcode"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errcode);
            return writer;
        };

        /**
         * Encodes the specified ResBase message, length delimited. Does not implicitly {@link Common.ResBase.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Common.ResBase
         * @static
         * @param {Common.IResBase} message ResBase message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ResBase.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ResBase message from the specified reader or buffer.
         * @function decode
         * @memberof Common.ResBase
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Common.ResBase} ResBase
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ResBase.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Common.ResBase();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.errcode = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ResBase message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Common.ResBase
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Common.ResBase} ResBase
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ResBase.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ResBase message.
         * @function verify
         * @memberof Common.ResBase
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ResBase.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.errcode != null && message.hasOwnProperty("errcode"))
                if (!$util.isInteger(message.errcode))
                    return "errcode: integer expected";
            return null;
        };

        /**
         * Creates a ResBase message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Common.ResBase
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Common.ResBase} ResBase
         */
        ResBase.fromObject = function fromObject(object) {
            if (object instanceof $root.Common.ResBase)
                return object;
            var message = new $root.Common.ResBase();
            if (object.errcode != null)
                message.errcode = object.errcode | 0;
            return message;
        };

        /**
         * Creates a plain object from a ResBase message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Common.ResBase
         * @static
         * @param {Common.ResBase} message ResBase
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ResBase.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.errcode = 0;
            if (message.errcode != null && message.hasOwnProperty("errcode"))
                object.errcode = message.errcode;
            return object;
        };

        /**
         * Converts this ResBase to JSON.
         * @function toJSON
         * @memberof Common.ResBase
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ResBase.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for ResBase
         * @function getTypeUrl
         * @memberof Common.ResBase
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        ResBase.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Common.ResBase";
        };

        return ResBase;
    })();

    return Common;
})();

$root.Calc = (function() {

    /**
     * Namespace Calc.
     * @exports Calc
     * @namespace
     */
    var Calc = {};

    /**
     * CalcMsgType enum.
     * @name Calc.CalcMsgType
     * @enum {number}
     * @property {number} GetShuiPingChaiFenQuYu_Thread=0 GetShuiPingChaiFenQuYu_Thread value
     * @property {number} GetTuiJianDeFenXiang=1 GetTuiJianDeFenXiang value
     * @property {number} CalcuDanTiNGQScheme=2 CalcuDanTiNGQScheme value
     * @property {number} GetDhbChaiFenScheme=3 GetDhbChaiFenScheme value
     * @property {number} Factory_gongmu=4 Factory_gongmu value
     * @property {number} Factory_paimu=5 Factory_paimu value
     * @property {number} Factory_duiduo=6 Factory_duiduo value
     * @property {number} Factory_zhuangche=7 Factory_zhuangche value
     * @property {number} Factory_dhb_all=8 Factory_dhb_all value
     */
    Calc.CalcMsgType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "GetShuiPingChaiFenQuYu_Thread"] = 0;
        values[valuesById[1] = "GetTuiJianDeFenXiang"] = 1;
        values[valuesById[2] = "CalcuDanTiNGQScheme"] = 2;
        values[valuesById[3] = "GetDhbChaiFenScheme"] = 3;
        values[valuesById[4] = "Factory_gongmu"] = 4;
        values[valuesById[5] = "Factory_paimu"] = 5;
        values[valuesById[6] = "Factory_duiduo"] = 6;
        values[valuesById[7] = "Factory_zhuangche"] = 7;
        values[valuesById[8] = "Factory_dhb_all"] = 8;
        return values;
    })();

    Calc.CalcRes = (function() {

        /**
         * Properties of a CalcRes.
         * @memberof Calc
         * @interface ICalcRes
         * @property {Common.IResBase|null} [res] CalcRes res
         */

        /**
         * Constructs a new CalcRes.
         * @memberof Calc
         * @classdesc Represents a CalcRes.
         * @implements ICalcRes
         * @constructor
         * @param {Calc.ICalcRes=} [properties] Properties to set
         */
        function CalcRes(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * CalcRes res.
         * @member {Common.IResBase|null|undefined} res
         * @memberof Calc.CalcRes
         * @instance
         */
        CalcRes.prototype.res = null;

        /**
         * Creates a new CalcRes instance using the specified properties.
         * @function create
         * @memberof Calc.CalcRes
         * @static
         * @param {Calc.ICalcRes=} [properties] Properties to set
         * @returns {Calc.CalcRes} CalcRes instance
         */
        CalcRes.create = function create(properties) {
            return new CalcRes(properties);
        };

        /**
         * Encodes the specified CalcRes message. Does not implicitly {@link Calc.CalcRes.verify|verify} messages.
         * @function encode
         * @memberof Calc.CalcRes
         * @static
         * @param {Calc.ICalcRes} message CalcRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CalcRes.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.res != null && Object.hasOwnProperty.call(message, "res"))
                $root.Common.ResBase.encode(message.res, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified CalcRes message, length delimited. Does not implicitly {@link Calc.CalcRes.verify|verify} messages.
         * @function encodeDelimited
         * @memberof Calc.CalcRes
         * @static
         * @param {Calc.ICalcRes} message CalcRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CalcRes.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CalcRes message from the specified reader or buffer.
         * @function decode
         * @memberof Calc.CalcRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {Calc.CalcRes} CalcRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CalcRes.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Calc.CalcRes();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.res = $root.Common.ResBase.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a CalcRes message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof Calc.CalcRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {Calc.CalcRes} CalcRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CalcRes.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CalcRes message.
         * @function verify
         * @memberof Calc.CalcRes
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CalcRes.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.res != null && message.hasOwnProperty("res")) {
                var error = $root.Common.ResBase.verify(message.res);
                if (error)
                    return "res." + error;
            }
            return null;
        };

        /**
         * Creates a CalcRes message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof Calc.CalcRes
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {Calc.CalcRes} CalcRes
         */
        CalcRes.fromObject = function fromObject(object) {
            if (object instanceof $root.Calc.CalcRes)
                return object;
            var message = new $root.Calc.CalcRes();
            if (object.res != null) {
                if (typeof object.res !== "object")
                    throw TypeError(".Calc.CalcRes.res: object expected");
                message.res = $root.Common.ResBase.fromObject(object.res);
            }
            return message;
        };

        /**
         * Creates a plain object from a CalcRes message. Also converts values to other types if specified.
         * @function toObject
         * @memberof Calc.CalcRes
         * @static
         * @param {Calc.CalcRes} message CalcRes
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CalcRes.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.res = null;
            if (message.res != null && message.hasOwnProperty("res"))
                object.res = $root.Common.ResBase.toObject(message.res, options);
            return object;
        };

        /**
         * Converts this CalcRes to JSON.
         * @function toJSON
         * @memberof Calc.CalcRes
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CalcRes.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CalcRes
         * @function getTypeUrl
         * @memberof Calc.CalcRes
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CalcRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/Calc.CalcRes";
        };

        return CalcRes;
    })();

    return Calc;
})();

$root.CalcConfig = (function() {

    /**
     * Namespace CalcConfig.
     * @exports CalcConfig
     * @namespace
     */
    var CalcConfig = {};

    /**
     * CalcConfigMsgType enum.
     * @name CalcConfig.CalcConfigMsgType
     * @enum {number}
     * @property {number} GetShuiPingChaiFenQuYu_Thread=0 GetShuiPingChaiFenQuYu_Thread value
     * @property {number} GetTuiJianDeFenXiang=1 GetTuiJianDeFenXiang value
     * @property {number} CalcuDanTiNGQScheme=2 CalcuDanTiNGQScheme value
     * @property {number} GetDhbChaiFenScheme=3 GetDhbChaiFenScheme value
     * @property {number} Factory_gongmu=4 Factory_gongmu value
     * @property {number} Factory_paimu=5 Factory_paimu value
     * @property {number} Factory_duiduo=6 Factory_duiduo value
     * @property {number} Factory_zhuangche=7 Factory_zhuangche value
     * @property {number} Factory_dhb_all=8 Factory_dhb_all value
     */
    CalcConfig.CalcConfigMsgType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "GetShuiPingChaiFenQuYu_Thread"] = 0;
        values[valuesById[1] = "GetTuiJianDeFenXiang"] = 1;
        values[valuesById[2] = "CalcuDanTiNGQScheme"] = 2;
        values[valuesById[3] = "GetDhbChaiFenScheme"] = 3;
        values[valuesById[4] = "Factory_gongmu"] = 4;
        values[valuesById[5] = "Factory_paimu"] = 5;
        values[valuesById[6] = "Factory_duiduo"] = 6;
        values[valuesById[7] = "Factory_zhuangche"] = 7;
        values[valuesById[8] = "Factory_dhb_all"] = 8;
        return values;
    })();

    CalcConfig.CalcConfigRes = (function() {

        /**
         * Properties of a CalcConfigRes.
         * @memberof CalcConfig
         * @interface ICalcConfigRes
         * @property {Common.IResBase|null} [res] CalcConfigRes res
         */

        /**
         * Constructs a new CalcConfigRes.
         * @memberof CalcConfig
         * @classdesc Represents a CalcConfigRes.
         * @implements ICalcConfigRes
         * @constructor
         * @param {CalcConfig.ICalcConfigRes=} [properties] Properties to set
         */
        function CalcConfigRes(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * CalcConfigRes res.
         * @member {Common.IResBase|null|undefined} res
         * @memberof CalcConfig.CalcConfigRes
         * @instance
         */
        CalcConfigRes.prototype.res = null;

        /**
         * Creates a new CalcConfigRes instance using the specified properties.
         * @function create
         * @memberof CalcConfig.CalcConfigRes
         * @static
         * @param {CalcConfig.ICalcConfigRes=} [properties] Properties to set
         * @returns {CalcConfig.CalcConfigRes} CalcConfigRes instance
         */
        CalcConfigRes.create = function create(properties) {
            return new CalcConfigRes(properties);
        };

        /**
         * Encodes the specified CalcConfigRes message. Does not implicitly {@link CalcConfig.CalcConfigRes.verify|verify} messages.
         * @function encode
         * @memberof CalcConfig.CalcConfigRes
         * @static
         * @param {CalcConfig.ICalcConfigRes} message CalcConfigRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CalcConfigRes.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.res != null && Object.hasOwnProperty.call(message, "res"))
                $root.Common.ResBase.encode(message.res, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified CalcConfigRes message, length delimited. Does not implicitly {@link CalcConfig.CalcConfigRes.verify|verify} messages.
         * @function encodeDelimited
         * @memberof CalcConfig.CalcConfigRes
         * @static
         * @param {CalcConfig.ICalcConfigRes} message CalcConfigRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CalcConfigRes.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CalcConfigRes message from the specified reader or buffer.
         * @function decode
         * @memberof CalcConfig.CalcConfigRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {CalcConfig.CalcConfigRes} CalcConfigRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CalcConfigRes.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CalcConfig.CalcConfigRes();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.res = $root.Common.ResBase.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a CalcConfigRes message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof CalcConfig.CalcConfigRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {CalcConfig.CalcConfigRes} CalcConfigRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CalcConfigRes.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CalcConfigRes message.
         * @function verify
         * @memberof CalcConfig.CalcConfigRes
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CalcConfigRes.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.res != null && message.hasOwnProperty("res")) {
                var error = $root.Common.ResBase.verify(message.res);
                if (error)
                    return "res." + error;
            }
            return null;
        };

        /**
         * Creates a CalcConfigRes message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof CalcConfig.CalcConfigRes
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {CalcConfig.CalcConfigRes} CalcConfigRes
         */
        CalcConfigRes.fromObject = function fromObject(object) {
            if (object instanceof $root.CalcConfig.CalcConfigRes)
                return object;
            var message = new $root.CalcConfig.CalcConfigRes();
            if (object.res != null) {
                if (typeof object.res !== "object")
                    throw TypeError(".CalcConfig.CalcConfigRes.res: object expected");
                message.res = $root.Common.ResBase.fromObject(object.res);
            }
            return message;
        };

        /**
         * Creates a plain object from a CalcConfigRes message. Also converts values to other types if specified.
         * @function toObject
         * @memberof CalcConfig.CalcConfigRes
         * @static
         * @param {CalcConfig.CalcConfigRes} message CalcConfigRes
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CalcConfigRes.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.res = null;
            if (message.res != null && message.hasOwnProperty("res"))
                object.res = $root.Common.ResBase.toObject(message.res, options);
            return object;
        };

        /**
         * Converts this CalcConfigRes to JSON.
         * @function toJSON
         * @memberof CalcConfig.CalcConfigRes
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CalcConfigRes.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CalcConfigRes
         * @function getTypeUrl
         * @memberof CalcConfig.CalcConfigRes
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CalcConfigRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/CalcConfig.CalcConfigRes";
        };

        return CalcConfigRes;
    })();

    return CalcConfig;
})();

$root.PBMath = (function() {

    /**
     * Namespace PBMath.
     * @exports PBMath
     * @namespace
     */
    var PBMath = {};

    PBMath.Vector2d = (function() {

        /**
         * Properties of a Vector2d.
         * @memberof PBMath
         * @interface IVector2d
         * @property {number|null} [X] Vector2d X
         * @property {number|null} [Y] Vector2d Y
         */

        /**
         * Constructs a new Vector2d.
         * @memberof PBMath
         * @classdesc Represents a Vector2d.
         * @implements IVector2d
         * @constructor
         * @param {PBMath.IVector2d=} [properties] Properties to set
         */
        function Vector2d(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Vector2d X.
         * @member {number} X
         * @memberof PBMath.Vector2d
         * @instance
         */
        Vector2d.prototype.X = 0;

        /**
         * Vector2d Y.
         * @member {number} Y
         * @memberof PBMath.Vector2d
         * @instance
         */
        Vector2d.prototype.Y = 0;

        /**
         * Creates a new Vector2d instance using the specified properties.
         * @function create
         * @memberof PBMath.Vector2d
         * @static
         * @param {PBMath.IVector2d=} [properties] Properties to set
         * @returns {PBMath.Vector2d} Vector2d instance
         */
        Vector2d.create = function create(properties) {
            return new Vector2d(properties);
        };

        /**
         * Encodes the specified Vector2d message. Does not implicitly {@link PBMath.Vector2d.verify|verify} messages.
         * @function encode
         * @memberof PBMath.Vector2d
         * @static
         * @param {PBMath.IVector2d} message Vector2d message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Vector2d.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.X != null && Object.hasOwnProperty.call(message, "X"))
                writer.uint32(/* id 1, wireType 1 =*/9).double(message.X);
            if (message.Y != null && Object.hasOwnProperty.call(message, "Y"))
                writer.uint32(/* id 2, wireType 1 =*/17).double(message.Y);
            return writer;
        };

        /**
         * Encodes the specified Vector2d message, length delimited. Does not implicitly {@link PBMath.Vector2d.verify|verify} messages.
         * @function encodeDelimited
         * @memberof PBMath.Vector2d
         * @static
         * @param {PBMath.IVector2d} message Vector2d message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Vector2d.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Vector2d message from the specified reader or buffer.
         * @function decode
         * @memberof PBMath.Vector2d
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {PBMath.Vector2d} Vector2d
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Vector2d.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PBMath.Vector2d();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.X = reader.double();
                        break;
                    }
                case 2: {
                        message.Y = reader.double();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Vector2d message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof PBMath.Vector2d
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {PBMath.Vector2d} Vector2d
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Vector2d.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Vector2d message.
         * @function verify
         * @memberof PBMath.Vector2d
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Vector2d.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.X != null && message.hasOwnProperty("X"))
                if (typeof message.X !== "number")
                    return "X: number expected";
            if (message.Y != null && message.hasOwnProperty("Y"))
                if (typeof message.Y !== "number")
                    return "Y: number expected";
            return null;
        };

        /**
         * Creates a Vector2d message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof PBMath.Vector2d
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {PBMath.Vector2d} Vector2d
         */
        Vector2d.fromObject = function fromObject(object) {
            if (object instanceof $root.PBMath.Vector2d)
                return object;
            var message = new $root.PBMath.Vector2d();
            if (object.X != null)
                message.X = Number(object.X);
            if (object.Y != null)
                message.Y = Number(object.Y);
            return message;
        };

        /**
         * Creates a plain object from a Vector2d message. Also converts values to other types if specified.
         * @function toObject
         * @memberof PBMath.Vector2d
         * @static
         * @param {PBMath.Vector2d} message Vector2d
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Vector2d.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.X = 0;
                object.Y = 0;
            }
            if (message.X != null && message.hasOwnProperty("X"))
                object.X = options.json && !isFinite(message.X) ? String(message.X) : message.X;
            if (message.Y != null && message.hasOwnProperty("Y"))
                object.Y = options.json && !isFinite(message.Y) ? String(message.Y) : message.Y;
            return object;
        };

        /**
         * Converts this Vector2d to JSON.
         * @function toJSON
         * @memberof PBMath.Vector2d
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Vector2d.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Vector2d
         * @function getTypeUrl
         * @memberof PBMath.Vector2d
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Vector2d.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/PBMath.Vector2d";
        };

        return Vector2d;
    })();

    return PBMath;
})();

$root.UserInfo = (function() {

    /**
     * Namespace UserInfo.
     * @exports UserInfo
     * @namespace
     */
    var UserInfo = {};

    /**
     * UserInfoMsgType enum.
     * @name UserInfo.UserInfoMsgType
     * @enum {number}
     * @property {number} S_Login=0 S_Login value
     * @property {number} S_Logout=1 S_Logout value
     */
    UserInfo.UserInfoMsgType = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "S_Login"] = 0;
        values[valuesById[1] = "S_Logout"] = 1;
        return values;
    })();

    UserInfo.Login = (function() {

        /**
         * Properties of a Login.
         * @memberof UserInfo
         * @interface ILogin
         * @property {Uint8Array|null} [name] Login name
         * @property {Uint8Array|null} [passwdMD5] Login passwdMD5
         */

        /**
         * Constructs a new Login.
         * @memberof UserInfo
         * @classdesc Represents a Login.
         * @implements ILogin
         * @constructor
         * @param {{name: string, passwdMD5: string}} [properties] Properties to set
         */
        function Login(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Login name.
         * @member {Uint8Array} name
         * @memberof UserInfo.Login
         * @instance
         */
        Login.prototype.name = $util.newBuffer([]);

        /**
         * Login passwdMD5.
         * @member {Uint8Array} passwdMD5
         * @memberof UserInfo.Login
         * @instance
         */
        Login.prototype.passwdMD5 = $util.newBuffer([]);

        /**
         * Creates a new Login instance using the specified properties.
         * @function create
         * @memberof UserInfo.Login
         * @static
         * @param {UserInfo.ILogin=} [properties] Properties to set
         * @returns {UserInfo.Login} Login instance
         */
        Login.create = function create(properties) {
            return new Login(properties);
        };

        /**
         * Encodes the specified Login message. Does not implicitly {@link UserInfo.Login.verify|verify} messages.
         * @function encode
         * @memberof UserInfo.Login
         * @static
         * @param {UserInfo.Login} message Login message or plain object to encode
         * @param {Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Login.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.name);
            if (message.passwdMD5 != null && Object.hasOwnProperty.call(message, "passwdMD5"))
                writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.passwdMD5);
            return writer;
        };

        /**
         * Encodes the specified Login message, length delimited. Does not implicitly {@link UserInfo.Login.verify|verify} messages.
         * @function encodeDelimited
         * @memberof UserInfo.Login
         * @static
         * @param {UserInfo.ILogin} message Login message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Login.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Login message from the specified reader or buffer.
         * @function decode
         * @memberof UserInfo.Login
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {UserInfo.Login} Login
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Login.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserInfo.Login();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.name = reader.bytes();
                        break;
                    }
                case 2: {
                        message.passwdMD5 = reader.bytes();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Login message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof UserInfo.Login
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {UserInfo.Login} Login
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Login.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Login message.
         * @function verify
         * @memberof UserInfo.Login
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Login.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.name != null && message.hasOwnProperty("name"))
                if (!(message.name && typeof message.name.length === "number" || $util.isString(message.name)))
                    return "name: buffer expected";
            if (message.passwdMD5 != null && message.hasOwnProperty("passwdMD5"))
                if (!(message.passwdMD5 && typeof message.passwdMD5.length === "number" || $util.isString(message.passwdMD5)))
                    return "passwdMD5: buffer expected";
            return null;
        };

        /**
         * Creates a Login message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof UserInfo.Login
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {UserInfo.Login} Login
         */
        Login.fromObject = function fromObject(object) {
            if (object instanceof $root.UserInfo.Login)
                return object;
            var message = new $root.UserInfo.Login();
            if (object.name != null)
                if (typeof object.name === "string")
                    $util.base64.decode(object.name, message.name = $util.newBuffer($util.base64.length(object.name)), 0);
                else if (object.name.length >= 0)
                    message.name = object.name;
            if (object.passwdMD5 != null)
                if (typeof object.passwdMD5 === "string")
                    $util.base64.decode(object.passwdMD5, message.passwdMD5 = $util.newBuffer($util.base64.length(object.passwdMD5)), 0);
                else if (object.passwdMD5.length >= 0)
                    message.passwdMD5 = object.passwdMD5;
            return message;
        };

        /**
         * Creates a plain object from a Login message. Also converts values to other types if specified.
         * @function toObject
         * @memberof UserInfo.Login
         * @static
         * @param {UserInfo.Login} message Login
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Login.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if (options.bytes === String)
                    object.name = "";
                else {
                    object.name = [];
                    if (options.bytes !== Array)
                        object.name = $util.newBuffer(object.name);
                }
                if (options.bytes === String)
                    object.passwdMD5 = "";
                else {
                    object.passwdMD5 = [];
                    if (options.bytes !== Array)
                        object.passwdMD5 = $util.newBuffer(object.passwdMD5);
                }
            }
            if (message.name != null && message.hasOwnProperty("name"))
                object.name = options.bytes === String ? $util.base64.encode(message.name, 0, message.name.length) : options.bytes === Array ? Array.prototype.slice.call(message.name) : message.name;
            if (message.passwdMD5 != null && message.hasOwnProperty("passwdMD5"))
                object.passwdMD5 = options.bytes === String ? $util.base64.encode(message.passwdMD5, 0, message.passwdMD5.length) : options.bytes === Array ? Array.prototype.slice.call(message.passwdMD5) : message.passwdMD5;
            return object;
        };

        /**
         * Converts this Login to JSON.
         * @function toJSON
         * @memberof UserInfo.Login
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Login.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Login
         * @function getTypeUrl
         * @memberof UserInfo.Login
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Login.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/UserInfo.Login";
        };

        return Login;
    })();

    UserInfo.Logout = (function() {

        /**
         * Properties of a Logout.
         * @memberof UserInfo
         * @interface ILogout
         * @property {number|null} [id] Logout id
         */

        /**
         * Constructs a new Logout.
         * @memberof UserInfo
         * @classdesc Represents a Logout.
         * @implements ILogout
         * @constructor
         * @param {UserInfo.ILogout=} [properties] Properties to set
         */
        function Logout(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Logout id.
         * @member {number} id
         * @memberof UserInfo.Logout
         * @instance
         */
        Logout.prototype.id = 0;

        /**
         * Creates a new Logout instance using the specified properties.
         * @function create
         * @memberof UserInfo.Logout
         * @static
         * @param {UserInfo.ILogout=} [properties] Properties to set
         * @returns {UserInfo.Logout} Logout instance
         */
        Logout.create = function create(properties) {
            return new Logout(properties);
        };

        /**
         * Encodes the specified Logout message. Does not implicitly {@link UserInfo.Logout.verify|verify} messages.
         * @function encode
         * @memberof UserInfo.Logout
         * @static
         * @param {UserInfo.ILogout} message Logout message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Logout.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
            return writer;
        };

        /**
         * Encodes the specified Logout message, length delimited. Does not implicitly {@link UserInfo.Logout.verify|verify} messages.
         * @function encodeDelimited
         * @memberof UserInfo.Logout
         * @static
         * @param {UserInfo.ILogout} message Logout message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Logout.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Logout message from the specified reader or buffer.
         * @function decode
         * @memberof UserInfo.Logout
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {UserInfo.Logout} Logout
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Logout.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserInfo.Logout();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.id = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Logout message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof UserInfo.Logout
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {UserInfo.Logout} Logout
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Logout.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Logout message.
         * @function verify
         * @memberof UserInfo.Logout
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Logout.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isInteger(message.id))
                    return "id: integer expected";
            return null;
        };

        /**
         * Creates a Logout message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof UserInfo.Logout
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {UserInfo.Logout} Logout
         */
        Logout.fromObject = function fromObject(object) {
            if (object instanceof $root.UserInfo.Logout)
                return object;
            var message = new $root.UserInfo.Logout();
            if (object.id != null)
                message.id = object.id | 0;
            return message;
        };

        /**
         * Creates a plain object from a Logout message. Also converts values to other types if specified.
         * @function toObject
         * @memberof UserInfo.Logout
         * @static
         * @param {UserInfo.Logout} message Logout
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Logout.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.id = 0;
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            return object;
        };

        /**
         * Converts this Logout to JSON.
         * @function toJSON
         * @memberof UserInfo.Logout
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Logout.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Logout
         * @function getTypeUrl
         * @memberof UserInfo.Logout
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Logout.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/UserInfo.Logout";
        };

        return Logout;
    })();

    UserInfo.LoginRes = (function() {

        /**
         * Properties of a LoginRes.
         * @memberof UserInfo
         * @interface ILoginRes
         * @property {Common.IResBase|null} [res] LoginRes res
         * @property {number|null} [id] LoginRes id
         * @property {Uint8Array|null} [name] LoginRes name
         * @property {number|null} [EnumUserAccountKind] LoginRes EnumUserAccountKind
         */

        /**
         * Constructs a new LoginRes.
         * @memberof UserInfo
         * @classdesc Represents a LoginRes.
         * @implements ILoginRes
         * @constructor
         * @param {UserInfo.ILoginRes=} [properties] Properties to set
         */
        function LoginRes(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * LoginRes res.
         * @member {Common.IResBase|null|undefined} res
         * @memberof UserInfo.LoginRes
         * @instance
         */
        LoginRes.prototype.res = null;

        /**
         * LoginRes id.
         * @member {number} id
         * @memberof UserInfo.LoginRes
         * @instance
         */
        LoginRes.prototype.id = 0;

        /**
         * LoginRes name.
         * @member {Uint8Array} name
         * @memberof UserInfo.LoginRes
         * @instance
         */
        LoginRes.prototype.name = $util.newBuffer([]);

        /**
         * LoginRes EnumUserAccountKind.
         * @member {number} EnumUserAccountKind
         * @memberof UserInfo.LoginRes
         * @instance
         */
        LoginRes.prototype.EnumUserAccountKind = 0;

        /**
         * Creates a new LoginRes instance using the specified properties.
         * @function create
         * @memberof UserInfo.LoginRes
         * @static
         * @param {UserInfo.ILoginRes=} [properties] Properties to set
         * @returns {UserInfo.LoginRes} LoginRes instance
         */
        LoginRes.create = function create(properties) {
            return new LoginRes(properties);
        };

        /**
         * Encodes the specified LoginRes message. Does not implicitly {@link UserInfo.LoginRes.verify|verify} messages.
         * @function encode
         * @memberof UserInfo.LoginRes
         * @static
         * @param {UserInfo.ILoginRes} message LoginRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LoginRes.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.res != null && Object.hasOwnProperty.call(message, "res"))
                $root.Common.ResBase.encode(message.res, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.id);
            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.name);
            if (message.EnumUserAccountKind != null && Object.hasOwnProperty.call(message, "EnumUserAccountKind"))
                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.EnumUserAccountKind);
            return writer;
        };

        /**
         * Encodes the specified LoginRes message, length delimited. Does not implicitly {@link UserInfo.LoginRes.verify|verify} messages.
         * @function encodeDelimited
         * @memberof UserInfo.LoginRes
         * @static
         * @param {UserInfo.ILoginRes} message LoginRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LoginRes.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a LoginRes message from the specified reader or buffer.
         * @function decode
         * @memberof UserInfo.LoginRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {UserInfo.LoginRes} LoginRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LoginRes.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserInfo.LoginRes();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.res = $root.Common.ResBase.decode(reader, reader.uint32());
                        break;
                    }
                case 2: {
                        message.id = reader.int32();
                        break;
                    }
                case 3: {
                        message.name = reader.bytes();
                        break;
                    }
                case 4: {
                        message.EnumUserAccountKind = reader.int32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a LoginRes message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof UserInfo.LoginRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {UserInfo.LoginRes} LoginRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LoginRes.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a LoginRes message.
         * @function verify
         * @memberof UserInfo.LoginRes
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        LoginRes.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.res != null && message.hasOwnProperty("res")) {
                var error = $root.Common.ResBase.verify(message.res);
                if (error)
                    return "res." + error;
            }
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isInteger(message.id))
                    return "id: integer expected";
            if (message.name != null && message.hasOwnProperty("name"))
                if (!(message.name && typeof message.name.length === "number" || $util.isString(message.name)))
                    return "name: buffer expected";
            if (message.EnumUserAccountKind != null && message.hasOwnProperty("EnumUserAccountKind"))
                if (!$util.isInteger(message.EnumUserAccountKind))
                    return "EnumUserAccountKind: integer expected";
            return null;
        };

        /**
         * Creates a LoginRes message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof UserInfo.LoginRes
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {UserInfo.LoginRes} LoginRes
         */
        LoginRes.fromObject = function fromObject(object) {
            if (object instanceof $root.UserInfo.LoginRes)
                return object;
            var message = new $root.UserInfo.LoginRes();
            if (object.res != null) {
                if (typeof object.res !== "object")
                    throw TypeError(".UserInfo.LoginRes.res: object expected");
                message.res = $root.Common.ResBase.fromObject(object.res);
            }
            if (object.id != null)
                message.id = object.id | 0;
            if (object.name != null)
                if (typeof object.name === "string")
                    $util.base64.decode(object.name, message.name = $util.newBuffer($util.base64.length(object.name)), 0);
                else if (object.name.length >= 0)
                    message.name = object.name;
            if (object.EnumUserAccountKind != null)
                message.EnumUserAccountKind = object.EnumUserAccountKind | 0;
            return message;
        };

        /**
         * Creates a plain object from a LoginRes message. Also converts values to other types if specified.
         * @function toObject
         * @memberof UserInfo.LoginRes
         * @static
         * @param {UserInfo.LoginRes} message LoginRes
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        LoginRes.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.res = null;
                object.id = 0;
                if (options.bytes === String)
                    object.name = "";
                else {
                    object.name = [];
                    if (options.bytes !== Array)
                        object.name = $util.newBuffer(object.name);
                }
                object.EnumUserAccountKind = 0;
            }
            if (message.res != null && message.hasOwnProperty("res"))
                object.res = $root.Common.ResBase.toObject(message.res, options);
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            if (message.name != null && message.hasOwnProperty("name"))
                object.name = options.bytes === String ? $util.base64.encode(message.name, 0, message.name.length) : options.bytes === Array ? Array.prototype.slice.call(message.name) : message.name;
            if (message.EnumUserAccountKind != null && message.hasOwnProperty("EnumUserAccountKind"))
                object.EnumUserAccountKind = message.EnumUserAccountKind;
            return object;
        };

        /**
         * Converts this LoginRes to JSON.
         * @function toJSON
         * @memberof UserInfo.LoginRes
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        LoginRes.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for LoginRes
         * @function getTypeUrl
         * @memberof UserInfo.LoginRes
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        LoginRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/UserInfo.LoginRes";
        };

        return LoginRes;
    })();

    UserInfo.LogoutRes = (function() {

        /**
         * Properties of a LogoutRes.
         * @memberof UserInfo
         * @interface ILogoutRes
         * @property {Common.IResBase|null} [res] LogoutRes res
         */

        /**
         * Constructs a new LogoutRes.
         * @memberof UserInfo
         * @classdesc Represents a LogoutRes.
         * @implements ILogoutRes
         * @constructor
         * @param {UserInfo.ILogoutRes=} [properties] Properties to set
         */
        function LogoutRes(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * LogoutRes res.
         * @member {Common.IResBase|null|undefined} res
         * @memberof UserInfo.LogoutRes
         * @instance
         */
        LogoutRes.prototype.res = null;

        /**
         * Creates a new LogoutRes instance using the specified properties.
         * @function create
         * @memberof UserInfo.LogoutRes
         * @static
         * @param {UserInfo.ILogoutRes=} [properties] Properties to set
         * @returns {UserInfo.LogoutRes} LogoutRes instance
         */
        LogoutRes.create = function create(properties) {
            return new LogoutRes(properties);
        };

        /**
         * Encodes the specified LogoutRes message. Does not implicitly {@link UserInfo.LogoutRes.verify|verify} messages.
         * @function encode
         * @memberof UserInfo.LogoutRes
         * @static
         * @param {UserInfo.ILogoutRes} message LogoutRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LogoutRes.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.res != null && Object.hasOwnProperty.call(message, "res"))
                $root.Common.ResBase.encode(message.res, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified LogoutRes message, length delimited. Does not implicitly {@link UserInfo.LogoutRes.verify|verify} messages.
         * @function encodeDelimited
         * @memberof UserInfo.LogoutRes
         * @static
         * @param {UserInfo.ILogoutRes} message LogoutRes message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        LogoutRes.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a LogoutRes message from the specified reader or buffer.
         * @function decode
         * @memberof UserInfo.LogoutRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {UserInfo.LogoutRes} LogoutRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LogoutRes.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserInfo.LogoutRes();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.res = $root.Common.ResBase.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a LogoutRes message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof UserInfo.LogoutRes
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {UserInfo.LogoutRes} LogoutRes
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        LogoutRes.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a LogoutRes message.
         * @function verify
         * @memberof UserInfo.LogoutRes
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        LogoutRes.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.res != null && message.hasOwnProperty("res")) {
                var error = $root.Common.ResBase.verify(message.res);
                if (error)
                    return "res." + error;
            }
            return null;
        };

        /**
         * Creates a LogoutRes message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof UserInfo.LogoutRes
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {UserInfo.LogoutRes} LogoutRes
         */
        LogoutRes.fromObject = function fromObject(object) {
            if (object instanceof $root.UserInfo.LogoutRes)
                return object;
            var message = new $root.UserInfo.LogoutRes();
            if (object.res != null) {
                if (typeof object.res !== "object")
                    throw TypeError(".UserInfo.LogoutRes.res: object expected");
                message.res = $root.Common.ResBase.fromObject(object.res);
            }
            return message;
        };

        /**
         * Creates a plain object from a LogoutRes message. Also converts values to other types if specified.
         * @function toObject
         * @memberof UserInfo.LogoutRes
         * @static
         * @param {UserInfo.LogoutRes} message LogoutRes
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        LogoutRes.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.res = null;
            if (message.res != null && message.hasOwnProperty("res"))
                object.res = $root.Common.ResBase.toObject(message.res, options);
            return object;
        };

        /**
         * Converts this LogoutRes to JSON.
         * @function toJSON
         * @memberof UserInfo.LogoutRes
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        LogoutRes.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for LogoutRes
         * @function getTypeUrl
         * @memberof UserInfo.LogoutRes
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        LogoutRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/UserInfo.LogoutRes";
        };

        return LogoutRes;
    })();

    return UserInfo;
})();

module.exports = $root;
